package com.buba.customer.service.impl;

import com.buba.customer.dao.CustomerAddrMapper;
import com.buba.customer.pojo.China;
import com.buba.customer.pojo.CustomerAddr;
import com.buba.customer.service.CustomerAddrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 用户地址业务接口实现
 */
@Service
public class CustomerAddrServiceImpl implements CustomerAddrService {
    private CustomerAddrMapper customerAddrMapper;

    @Override
    public int addCustomerAddr(CustomerAddr customerAddr) {
        return customerAddrMapper.addCustomerAddr(customerAddr);
    }



    @Override
    public Long selCount(Map<String, Object> map) {
        return customerAddrMapper.selCount(map);
    }

    @Override
    public Integer delCustomerAddr(String[] split) {
        return customerAddrMapper.delCustomerAddr(split);
    }

    @Override
    public List<CustomerAddr> selCustomerAddrByLoginId(Integer customerId) {
        return customerAddrMapper.selCustomerAddrByLoginId(customerId);
    }

    @Override
    public void updIsDefault() {
        customerAddrMapper.updIsDefault();
    }

    @Override
    public Integer updCustomerAddr(Integer id) {
        return customerAddrMapper.updCustomerAddr(id);
    }


    public CustomerAddrMapper getCustomerAddrMapper() {
        return customerAddrMapper;
    }
    @Autowired
    public void setCustomerAddrMapper(CustomerAddrMapper customerAddrMapper) {
        this.customerAddrMapper = customerAddrMapper;
    }
}
